/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jocabulary;

import java.io.*;
import java.util.*;

/**
 *
 * @author pit
 */
public class Language {

    private ArrayList units = new ArrayList();

    private String name;
    private String cleanName;

    Language(String pName, String pCleanName) {
        name = pName;
        cleanName = pCleanName;
    }

    public void addUnit(String pUnitName, String pCleanName, int pOnlineRevision) throws IOException {
        units.add(new Unit(pUnitName, pCleanName, pOnlineRevision));
    }

    public Unit getUnit(int index) {
        return (Unit) units.get(index);
    }

    public int getUnitCount() {
        return units.size();
    }

    public String getName() {
        return name;
    }

    public String getCleanName() {
        return cleanName;
    }
}
